<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Bootstrap 4, from LayoutIt!</title>

    <meta name="description" content="Source code generated using layoutit.com">
    <meta name="author" content="LayoutIt!">

    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/style.css" rel="stylesheet">
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/vue.min.js"></script>
    <style>
        #app{
            background-color: #d0d5d8;
        }
    </style>
</head>
<body>

<div id="app">
    <div class="container-fluid">
        <div class="row">
            <div class="col-md-12">
                <div class="row">
                    <div class="col-md-2">
                    </div>
                    <div class="col-md-8">
                        <ul style="width: 100%;margin: 0px;padding: 0px">
                            <li v-for="subject in results" style="width: 40%;margin: 2%;display: inline-block">
                                <a v-bind:href="'tags.html?subjectId='+subject.subjectId"><img v-bind:src="subject.subjectImage" width="140" height="100" style="border-radius: 5px"><br>{{subject.subjectName}}</a><br><hr>
                            </li>
                        </ul>

                    </div>
                    <div class="col-md-2">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<script type="text/javascript">
    new Vue({
        el:"#app",
        data:{
            results:[]
        },
        mounted:function () {
            let that=this
            $.ajax({
                url:"/question/search/subject",
                type:"GET",
                success:function (results) {
                    that.results=results.data
                    console.log(that.results)
                }
            })
        }

    })
</script>

</body>
</html>